package com.hzqy.service.statistics;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.hzqy.persistence.dao.statistics.MusicInteractiveDao;
import com.hzqy.service.core.GenericServiceBean;
import com.hzqy.web.vo.statistics.MusicInteractiveVo;

@Service
public class MusicInteractiveServiceBean extends GenericServiceBean<MusicInteractiveVo, MusicInteractiveDao, Integer>{
	private static final long serialVersionUID = 1L;
	protected final Logger LOG = LoggerFactory.getLogger(getClass());
	
	@Resource
	private MusicInteractiveDao musicInteractiveDao;
	
	@Override
	public MusicInteractiveDao getEntityDao() {
		return musicInteractiveDao;
	}
	
	public List<MusicInteractiveVo> getMusicInteractiveList(MusicInteractiveVo musicInteractiveVo,String beginDate,String endDate,int page,int rows){
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("f_uai_serverid",musicInteractiveVo.getF_uai_serverid());
		map.put("f_uai_activityid",musicInteractiveVo.getF_uai_activityid());
		map.put("f_uai_grade",musicInteractiveVo.getF_uai_grade());
		map.put("beginDate",beginDate);
		map.put("endDate",endDate);
		map.put("offset",(page-1)*rows);
		map.put("endNum",rows);
		return musicInteractiveDao.getMusicInteractiveList(map);
	} 
	
}
